home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 001-025 / scopedisk2 / conman / conman.doc < prev    next >
Text File  |  1995-03-18  |  18KB  |  355 lines

  1. ========================================================================
  2.                               ConMan V1.1
  3.                 Copyright (c) 1987, 1988 by William S. Hawes
  4. ========================================================================
  5.  
  6. ConMan is a replacement console handler that provides line editing and
  7. command history for any program that uses CON: windows.  It runs under
  8. AmigaDOS V1.2 and is completely transparent to other software.  After 
  9. ConMan has been activated, all CON: windows opened by AmigaDOS will 
  10. automatically use the ConMan handler.  This includes command windows
  11. opened by NEWCLI as well as any data input/output windows that your 
  12. program may use.
  13.  
  14. Version 1.1 offers several new features including command searching,
  15. word-delete keys, an "undo" buffer, a utility to preload or save the
  16. history buffer, and a command to select a keymap.  The most surprising 
  17. new feature, though, is an old feature --- ConMan is still shareware!
  18. You've probably noticed that a number of popular shareware programs have 
  19. "gone commercial" and demand payment in advance; ConMan won't join these,
  20. although my future products will be commercial until there is greater 
  21. public awareness towards shareware.
  22.  
  23.  
  24.                         ----- Line Editing -----
  25. ConMan allows you to edit the active (command) line using the left- and
  26. right-arrow keys for cursor positioning.  The shifted left-arrow key 
  27. skips to the beginning of the current or previous word, and the shifted 
  28. right-arrow key skips to the start of the next word.
  29.  
  30. ConMan supports both insert and overstrike editing modes.  The CTRL-A key
  31. toggles between the two modes, and the CTRL-^ key unconditionally selects
  32. insert mode.  The default input mode is insert, but you can set the global 
  33. -o flag to select overstrike mode.  The input mode normally reverts to the
  34. default mode each time you press RETURN, but the global -s ("sticky") flag 
  35. will cause the mode to remain set until you change it explicitly.
  36.  
  37. You can select the preferred input mode when you first install ConMan, 
  38. and can change it at any time using the SetCMan command utility.  Try 
  39. experimenting to see which input mode you like best, but note that these
  40. are global flags and therefore apply to ALL ConMan windows.  Refer to
  41. the paragraph on installation for a list of the global option flags.
  42.  
  43. There are several keys that can be used to delete characters, words, or 
  44. the entire line.  The DEL key deletes the character under the cursor, 
  45. and the BACKSPACE key deletes the character to the left of the cursor.  
  46. CTRL-Y deletes from the cursor position to the end of the line, and 
  47. CTRL-U deletes from the cursor to the start of the line.  CTRL-X deletes
  48. the entire line, in keeping with the default CON: device.
  49.  
  50. Function keys F7 and F8 can be used to delete words in the backwards and 
  51. forwards direction, respectively.  They work just like the shifted left- 
  52. and right-arrow keys except that the characters are deleted.
  53.  
  54. CTRL-Z deletes both the current line and any lines that have been typed
  55. ahead (but not yet read); this is very handy if you want to completely 
  56. abandon all typed-ahead lines.  CTRL-R provides a less drastic recall 
  57. by posting the typed-ahead lines back to the command line.
  58.  
  59. The Undo Buffer.
  60. If you're editing a line and accidentally hit the up- or down-arrow key, 
  61. all is not lost.  Just press the CTRL-- (control-minus) key and the 
  62. former line will be posted back to the active line.  Only lines that
  63. have been changed are added to the undo buffer.
  64.  
  65. Flow Control.
  66. CTRL-S and CTRL-Q have been implemented to hold and release the screen        
  67. output, respectively.  While the CTRL-S action is not strictly necessary,
  68. since entering any character will halt output to the screen, it is a
  69. standard control option.  CTRL-W clears the entire window and refreshes
  70. the active line.
  71.  
  72. End-of-File.
  73. One other control character is recognized:  CTRL-\ sends an end-of-file
  74. (a zero-length block) to the task reading from the handler.
  75.  
  76. All characters not explicitly required for editing purposes are passed on
  77. to the command line.  In order to provide a consistent display, characters
  78. that might cause interference with the display (like CTRL-L) are displayed
  79. as a caret (^) followed by the uppercase alphabetic character.  Version
  80. 1.1 now supports the CTRL-N (shift-in) and CTRL-O (shift-out) characters.
  81. Miscellaneous non-printable characters are displayed as a hash mark.
  82.  
  83.  
  84.                        ----- Command History -----
  85. ConMan "remembers" the commands that you type and lets you recall them
  86. sequentially using the up- and down-arrow keys.  If you go past the line
  87. you want, the down-arrow key will retrieve the next (more recent) line.  
  88. The shifted up-arrow key recalls the oldest line, and shifted down-arrow 
  89. recalls the most recent line.  The CTRL-B key will clear the buffer.
  90.  
  91. The history buffer is organized as a fixed-length memory pool with a
  92. default length of 488 bytes.  New lines are inserted at one end, and 
  93. the oldest lines are "pushed off" the other end to make room.  The number
  94. of lines that can be saved depends on their lengths, but is generally in
  95. the range of 25 to 30.  The default size can be changed when you install 
  96. ConMan by using the -b option followed by the desired size in bytes.  
  97. For example, the command "conman -c -b1000" installs ConMan with a 
  98. 1000-byte history buffer.
  99.  
  100. ConMan maintains the history in one of two modes.  In the default mode, 
  101. recalled lines are not re-entered into the history buffer unless the 
  102. line was "touched," and the history index pointer is left positioned at
  103. the retrieved line.  This mode is convenient if you often go back into 
  104. the buffer to retrieve sequences of commands.
  105.  
  106. In "true history" mode, every line is re-entered into the history buffer,
  107. even if it hasn't been modified after being recalled.  The history pointer
  108. is always reset (to the most recent line) whenever a line is added to the 
  109. buffer.  The history mode can be selected when ConMan is installed or 
  110. by using the SetCMan utility.
  111.  
  112. If you prefer to regard the history buffer as a circular buffer rather 
  113. than a stack, try setting the -wrap option with ConMan or SetCMan.  The
  114. index will "wrap-around" when it hits the top or bottom of the stack.
  115.  
  116. Release V1.1 of ConMan includes a command called "History" that will save,
  117. load, or display the history buffer.  Refer to the "history.doc" file for 
  118. more information.
  119.  
  120.  
  121.                          ----- Function Keys -----
  122. There are several additional editing functions and window control features
  123. that use the function keys.
  124.  
  125. Key F1 shrinks ("iconifies") the window to its minimum size, and F2 "zooms" 
  126. the window to its maximum size (usually the entire screen.)  Both keys act 
  127. as "toggles," and shrunken windows may be zoomed (and vice-versa.)  If the 
  128. window was opened without a sizing gadget, neither F1 or F2 will have any 
  129. effect.
  130.  
  131. Keys F5 and F6 are used to search for commands.  If you type a partial 
  132. command line and then press F6, ConMan searches in the up-arrow direction 
  133. for a line matching up to the cursor position.  You can move the cursor
  134. to the right to constrain the search.  Key F5 works similarly in the 
  135. down-arrow direction.
  136.  
  137. Keys F7 and F8 delete words in the backwards and forwards direction.  
  138. They operate just like the shifted left- and right-arrow keys except that
  139. the words are deleted rather than just skipped over.
  140.  
  141. Function key F9 moves the screen to the front or back of the display, 
  142. and F10 moves the window to the front or back.  Both keys act as "toggles" 
  143. provided that you don't deactivate the window or screen.  These keys are
  144. useful when you're working with multiple windows or screens and need to 
  145. peek at the one in back.
  146.  
  147.  
  148.                      ----- Window Definitions -----
  149. ConMan accepts the standard AmigaDOS window specifications.  For example,
  150. "CON:160/50/320/100/MyWindow" specifies a window 320x100 pixels in size,
  151. beginning in position (160,50).  The numeric parameters are truncated
  152. against the maximum screen size, so a larger-than-normal window may be
  153. safely specified (for those of you using "morerows").  The default size
  154. is the full screen width and height.  ConMan sets the minimum window size
  155. to allow room for the close gadget and depth gadgets.
  156.  
  157. Various Intuition options and gadgets can be selected by including a list
  158. of attributes after the window title.  Here's how it works:  put another 
  159. slash ("/") after the window title, and follow it with any of the
  160. attribute options listed below.
  161.  
  162.    Option Character                 Default Value    
  163.    ----------------                 -------------
  164.    A <==> Activate                  Activated
  165.    B <==> BackDrop                  Not a backdrop
  166.    C <==> Close gadget              No close gadget
  167.    D <==> Depth gadgets             Depth gadgets
  168.    M <==> Move (drag) gadget        Drag gadget
  169.    N <==> NoBorder                  Border (sorry, "B" was used)
  170.    R <==> Refresh (SMART/SIMPLE)    Smart refresh
  171.    S <==> Sizing gadget             Sizing gadget
  172.    Z <==> Zero-Zero                 Not a GZZ
  173.  
  174. Each option character serves to TOGGLE the corresponding window attribute,
  175. so if you include an option twice, it will cancel the effect.  The closing 
  176. slash is optional.  My apologies to those who wanted a slash in the title.
  177.  
  178. Examples: CON:10/10/300/100/Behind/nb/   a borderless backdrop window.
  179.           CON:10/10/300/100/Fixed/acm    a nonactivated window, with a 
  180.                                          close gadget, that won't budge.
  181.  
  182.  
  183.                         ----- Installation ----
  184. To install ConMan you will need to copy two files to your system disk, 
  185. but don't worry --- they're both small.  Install the file "Conhandler" 
  186. (184 bytes) in your L: directory, to keep those bigger handlers company.  
  187. Then copy the file "conhandler.library" (6152 bytes) into your LIBS: 
  188. directory.  If you received ConMan in the form of an ARCed file, first
  189. unARC it and then be sure to rename "conlib.lib" and "chandler", or use 
  190. the provided "ARCinstall" script to copy the files.
  191.  
  192. Once these files have been installed, issue the command "conman -c" to 
  193. activate the handler.  You should only run ConMan once, as it allocates 
  194. 20 bytes of memory for the handler name string which won't be released.
  195. After you've activated ConMan, open a window using NEWCLI and check to
  196. to make sure that the new window has line editing and command history.
  197. Once every thing is working properly, you should place the "conman -c"
  198. command in your startup-sequence so that it's always available.
  199.  
  200. NOTE:  ConMan affects only those windows opened AFTER you activate it!
  201. It would be very impolite indeed to pull the old handler out from under 
  202. the existing windows.
  203.  
  204. You can specify several command line arguments with the ConMan command:
  205.  
  206.    Code     Action
  207.    ------   ------
  208.    -bNNNN   select buffer size NNNN bytes
  209.    -c       install as CON: (the default)
  210.    -o       select overstrike mode
  211.    -r       install as RAW:
  212.    -s       select "sticky" mode
  213.    -t       maintain "true history"
  214.    -w       select "wrap-around" history
  215.  
  216. These command options can appear in any order and remain in effect until
  217. you reboot the computer.  The -q option used in previous releases is now
  218. obsolete, as ConMan writes its copyright to standard output by default.
  219.  
  220. A separate utility program called "SetCMan" has been provided to modify 
  221. or display the global options.  You can use SetCMan to change the -o, 
  222. -s, -t, or -w options at any time.
  223. Examples: setcman ?
  224.           setcman -o -s -t
  225.  
  226. If you usually operate from WorkBench and only occasionally need a CLI,
  227. you can activate ConMan by using the icons.  First double-click on the 
  228. "LoadLib" icon to load the conhandler library, and then activate ConMan
  229. by double-clicking the "ConMan" icon.  The next CLI you open should now
  230. have the line editing and command history provided by ConMan.
  231.  
  232.  
  233.                          ----- Distribution -----
  234. This program is distributed as shareware (user-supported software) to 
  235. Amigoid life-forms everywhere!  Make sure your friends get a copy.  
  236. Your contributions are greatly appreciated and will help me maintain 
  237. ConMan as well as develop new products.  Send all correspondence to:
  238.  
  239.       William S. Hawes
  240.       P.O. Box 308
  241.       Maynard, MA 01754
  242.       (617) 568-8695
  243.  
  244. My network addresses are BIX: whawes, PLINK: whawes, and CIS: 72230,267.
  245.  
  246. The suggested contribution is $10 (based on an earlier survey), but any 
  247. amount is welcome.  Fewer than 200 people have contributed in the year 
  248. since ConMan was first released.  Although this is actually good by 
  249. shareware standards, it wouldn't suffice to buy even one full-page ad
  250. in (for example) AmigaWorld.
  251.  
  252. Commercial vendors are welcome to include ConMan with their products,
  253. provided that it's noted as being shareware and that the documentation 
  254. accompanies the software.
  255.  
  256.  
  257.                        ----- Other Products -----
  258. I have a couple of other products available commercially.   ARexx and 
  259. WShell can be found at better dealers**, or you can order them directly 
  260. from me at the above address.
  261.  
  262. ARexx is a multitasking implementation of the REXX language, a high-level
  263. interpreted language designed for macro-processing.  ARexx can be used
  264. as the macro language for any software package that includes an ARexx
  265. interface.  ............................ Only $49.95 (plus $2.00 shipping)
  266.  
  267. WShell is a fully-compatible CLI replacement with aliases, built-in and
  268. resident commands, concurrent piping (as in pgm1 | pgm2 | ... | pgmN),
  269. extended prompt/window titlebar fields, transparent support for REXX
  270. macro programs, and a number of other features.  Isn't it time you put
  271. some mussel in your command environment?  Just 50 clams (+ $2.00 shipping)
  272.  
  273. ** better dealers are those that stock ARexx and WShell.
  274.  
  275.  
  276.                          ----- Further Notes -----
  277. ConMan also accepts input specifications in the form "CON:w20480", 
  278. where the hex digits following the "w" are the absolute address of an 
  279. Intuition window pointer.  This allows you to attach a console handler
  280. to an existing window in a multitasking-safe way (unlike the methods that
  281. require setting a field in the DOS device list).  If you're writing in C, 
  282. you could use the following sequence to open a window and attach a DOS 
  283. console to it:
  284.  
  285.       window = OpenWindow(&newwindow);   /* get a window          */
  286.       sprintf(buffer,"CON:W%x",window);  /* build the name string */
  287.       file  = Open(buffer,MODE_OLDFILE); /* open a console stream */ 
  288.  
  289. You can open a console window on a custom screen by including the hex
  290. address of the screen in the specification string, as in 
  291.                "CON:S123abc/10/10/300/100/MyWindow."
  292.  
  293. Other Names.
  294. ConMan answers to several names in addition to "CON:".  You can define it 
  295. as the "CNC:" device by appending the included "mountlist" file to your 
  296. DEVS:mountlist and then issuing the command "mount CNC:".  The CNC: device
  297. can then be used just like a CON: window.  This allows the CON: definition 
  298. to be left intact, in case there are any incompatibilities between ConMan 
  299. and your existing software (but please let me know of any problems!)
  300.  
  301. ConMan is also a pipe-handler responding to the name PIP:NNNN, where
  302. NNNN is the "capacity" of the pipe.  It must be opened using a private
  303. packet called ACTION_DOUBLE (value 2000L); the filehandle you get from
  304. a call to Open() counts for two and so can be cloned by your program.  
  305. My WShell command shell uses the ConMan PIP: device as the pipe handler.
  306.  
  307. Keymapping.
  308. ConMan supports the Amiga's keymapping facility, which allows you to 
  309. reassign the editing functions to the keys of your choice.  To do this, 
  310. you must first construct a keymap either in assembly language or with
  311. the help of a keymap editor.  You can then load the keymap using the 
  312. SetMap program on your WorkBench disk.  By default SetMap makes a keymap 
  313. global; if you want to use a special keymap from just one CLI, you can 
  314. use the included KeyMap command to define the desired map.  KeyMap with 
  315. no arguments will display a list of the available keymaps.
  316.  
  317.  
  318.                          ----- What Next? -----
  319. Several additional features will be added in the next release of ConMan.
  320. A number of people have requested an option to have the handler not 
  321. display typed-ahead lines, so that the running program can write freely 
  322. to the screen and lines will be displayed only as they are read.  Also
  323. in the works is support for an improved "iconify" state, so that the 
  324. window can be double-clicked to bring it back up to the former size.
  325.  
  326. I'm planning to release a ROM version of ConMan as soon as the hardware 
  327. vendors start including decoded ROM sockets on their boards.  If you're 
  328. interested in ROM-based software, drop me a note (or write directly to 
  329. the hardware companies).
  330.  
  331.  
  332.                              ----- Bugs -----
  333. All known bugs have been fixed in this release, so you should find it to 
  334. be very reliable.  If you do find a problem, PLEASE report it so I can 
  335. fix it!
  336.  
  337. There is a warning with regard to the "shrink" and "zoom" keys:  rapid 
  338. toggling between window states will crash the machine.  The problem 
  339. appears to be an interaction between Intuition and the console device
  340. and will probably get fixed when Commodore upgrades the console device
  341. in version 1.4.  Until then, take it easy with the F1/F2 keys.
  342.  
  343. An additional warning: the console device exhibits serious problems with 
  344. windows below some minimum size.  Opening windows of certain sizes 
  345. (e.g. con:0/0/10/20/) may cause the machine to crash, whether or not
  346. ConMan is active.  For these reasons, I strongly urge you avoid console 
  347. windows smaller than 60X25 or so.
  348.  
  349.  
  350.                        ----- Acknowledgements -----
  351. Special thanks to John Toebes and the Software Distillery for all the 
  352. great suggestions, and to the contributors who helped make V1.1 possible.
  353.  
  354.                                     WSH (03/07/88)
  355.